<template>
  <div class="standings1">
      <header>
          <p @click="Goback()">
            <i class="iconfont icon-fanhui"></i>
          </p>
          <p>卖房成交战绩</p>
          <p>
            <span class="iconfont icon-dian"></span>
            <span class="iconfont icon-yuanxinyuan"></span>
          </p>
      </header>
      <main>
        <p @click="City()">北京 <i class="iconfont icon-xia"></i></p>
        <p><input type="text" placeholder="搜索"></p>
        <p><span @click="Go()">租房成绩提交</span></p>
      </main>
      <footer>
        <div v-for="(item,index) in list" :key="index" class="house">
          <dl>
            <dt>
              
            </dt>
            <dd>
              <h3>{{item.house_tags}}</h3>
              <p class="count">
                <span>{{item.per_price}}</span>
                <span>{{item.bedroom_count}}</span>
                <span>{{item.house_title}}</span>
              </p>
              <p class="price">
                <span>{{item.total_price}}</span>
                <span>{{item.per_price}}</span>
              </p>
              <p class="type">
                <span>{{item.house_type}}</span>
              </p>
            </dd>
          </dl>
        </div>
      </footer>
  </div>
</template>

<script>
import axios from "../../utils/axios"
export default {
  data(){
    return{
      list:[]
    }
  },
  methods: {
    Go(){
      this.$router.push('/standings/standings2')
    },
    Goback(){
      this.$router.push('/home')
    },
    City(){
      this.$router.push('/city')
    },
  },
  created(){
    axios.get('/house/all').then(res=>{
      this.list=res.data.list
      console.log(this.list,'111');
    })
  }
}
</script>

<style>
*{
  margin: 0;
  padding: 0;
  list-style: none;
}
html,body,.App{
  width: 100%;
  height: 100%;
}
.standings1{
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
}
header{
    display: flex;
    width: 100%;
    height: 50px;
    align-items: center;
    justify-content: space-between;
    background-color: rgb(70, 142, 224);
    color: #fff;
    position: fixed;
}
header p{
  padding: 0 10px;
}
header p:nth-child(3){
  border: 1px solid #fff;
  border-radius: 20px;
  padding: 3px 5px;
  margin-right: 20px;
}
header p span{
  margin-left: 10px;
}
main{
  margin-top: 50px;
  position: fixed;
  width: 100%;
  height: 50px;
  align-items: center;
  display: flex;
  justify-content: space-around;
  background-color: #fff;
}
main p input{
  background-color: #eee;
  border: 1px solid #ccc;
}
main p span{
  color: royalblue;
}
footer{
  margin-top: 100px;
  width: 100%;
  height: 100%;
}
.house{
  padding: 10px;
}
.house dl{
  display: flex;
}
.house dl dt{
  width: 120px
}
.house dl dd{
  line-height: 20px;
}
.house dl dd h3{
  font-weight: bold;
  font-size: 16px;
}
.count{
  color: #666;
  font-size: 14px;
}
.count span{
  margin-right: 5px;
}
.price{
  display: flex;
  font-size: 14px;
}
.price span:nth-child(1){
  color: coral;
  font-weight: bold;
}
.price span:nth-child(2){
  color: #999;
}
.type{
  display: flex;
}
.type span{
  background-color: #ccc;
  color: #666;
  padding: 5px 10px;
}
</style>